package com.ruoyi.categories.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 图书分类对象 categories
 * 
 * @author anyunyi
 * @date 2025-05-28
 */
public class Categories extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 分类ID */
    private Long id;

    /** 分类名称（如“文学-小说”） */
    @Excel(name = "分类名称", readConverterExp = "如=“文学-小说”")
    private String name;

    /** 父分类ID（0为一级分类） */
    @Excel(name = "父分类ID", readConverterExp = "0=为一级分类")
    private Long parentId;

    /** 分类图标URL */
    @Excel(name = "分类图标URL")
    private String icon;

    /** 分类描述 */
    @Excel(name = "分类描述")
    private String description;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setParentId(Long parentId) 
    {
        this.parentId = parentId;
    }

    public Long getParentId() 
    {
        return parentId;
    }
    public void setIcon(String icon) 
    {
        this.icon = icon;
    }

    public String getIcon() 
    {
        return icon;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("parentId", getParentId())
            .append("icon", getIcon())
            .append("description", getDescription())
            .toString();
    }
}
